(function(clazz,pid,callback,updata){
	var classdat = Get("/clazz/name/"+clazz).obj;
	var fields   = classdat.fields;
	
	var itemsfields   = _("pocess.add.fun.getItems")(fields); 
	var items	= [];
	items.push({
		title:"基本信息",
        layout: {
            type: 'absolute'
        },
        xtype: "form",
        items:itemsfields
	});
	//log(updata);
	items.push({
		title:"流程图",
        layout: {
            type: 'absolute'
        },
        html:'<img  src="/process/img/'+updata.deploymentId+'"  alt="上海鲜花港 - 郁金香" />'
	});
	var	win	= new Ext.window.Window({
		title		:	"查看",
		modal 		:	true,   
		constrain	:	true, 	// 防止窗口超出浏览器窗口,保证不会越过浏览器边界
		resizable	:	false, 	// 是否可以调整窗口大小，默认TRUE。
		plain		:	true,	// 将窗口变为半透明状态。 
		draggable 	:	false,	//不可以移动
		height		:	"60%",
		width		:	550,
		//maximized:true,
		maximizable:true,
		layout		: 	{
			type	:	'fit',
			align	:	'stretch'
	    },
	    pid			:   pid,
	   // html		:	"<iframe style='width:100%;height:100%' src='modeler.html?modelId=7501'></iframe> ",
	    items		:	{
			 xtype	:	'tabpanel', 
			 flex: 1,
			 items	:	items
		}, 
		bbar:["->",{
			text:"启动当前流程",handler:function(){
				//log(updata.id);
				var msg = Get("/process/start/xxy/"+updata.id);
				if(msg!=null){
					//Ext.Msg.alert("提示","启动成功");
					this.ownerCt.ownerCt.close();
				}
			}
		}],
		listeners:{
			show:function(){
				if(updata!=null){
					var fields = classdat.fields;
					for(f in fields){
						if(fields[f].type=="obj"){
							Ext.getCmp(fields[f].name+"_id").setValue(updata[fields[f].name]["id"]);
							Ext.getCmp(fields[f].name).setValue(updata[fields[f].name][fields[f].clazzQuery]);
						}else if(fields[f].type!="list"){
							if(fields[f].type=="date"){
								Ext.getCmp(fields[f].name).setValue(new Date(updata[fields[f].name]));
							}else{
								Ext.getCmp(fields[f].name).setValue(updata[fields[f].name]);
							}
							
						}
					}
					//Ext.getCmp("id").setValue(updata["id"])
				}
			}
		}
	});
	_("tools.winshow")(win);
})